import os
import sys

if len(sys.argv) < 2:
    print "Please specify output file."
    sys.exit()

outFile = sys.argv[1]

f = open(outFile, 'w')

p = os.popen('./genRandom')

for line in p.readlines():
    f.write("{0}\n".format(line.strip()))

f.close()
